7c81b32fdc4c5bca2d8aa0cb653f4f8e36aa4d1d,servers/src/main/java/tachyon/worker/block/TieredBlockStore.java,TieredBlockStore,requestSpace,#number#number#number#,241

Before Change


  @Override
  public void requestSpace(long userId, long blockId, long additionalBytes)
      throws NotFoundException, OutOfSpaceException, IOException {
    int numRetries = 0;
    while (numRetries < MAX_RETRIES) {
      Pair<Boolean, BlockStoreLocation> requestResult =
          requestSpaceInternal(blockId, additionalBytes);
      if (requestResult.getFirst()) {
        return;
      }
      freeSpaceInternal(userId, additionalBytes, requestResult.getSecond());
      numRetries ++;
    }
    throw new OutOfSpaceException("Failed to requestSpace: blockId " + blockId

After Change


  @Override
  public void requestSpace(long userId, long blockId, long additionalBytes)
      throws NotFoundException, OutOfSpaceException, IOException {
    for (int i = 0; i < MAX_RETRIES + 1; i ++) {
      Pair<Boolean, BlockStoreLocation> requestResult =
          requestSpaceInternal(blockId, additionalBytes);
      if (requestResult.getFirst()) {
        return;
      }
      if (i < MAX_RETRIES) {
        freeSpaceInternal(userId, additionalBytes, requestResult.getSecond());
      }
    }
    throw new OutOfSpaceException("Failed to requestSpace: blockId " + blockId